FlyTalk.views.SettingView = Ext.extend(Ext.Panel, {
	fullscreen: true,
	
    initComponent: function () {
    	// back button on toolbar
		this.backButton = new Ext.Button({
			text: 'Back',
			ui: 'back',
			handler: this.backButtonTap,
			scope: this
		});
		
    	this.reviewButton = new Ext.Button({
    		text: 'Review (ComposeView)',
			ui: 'action',
			handler: this.reviewButtonTap,
			scope: this
        });
    	
    	this.suggestButton = new Ext.Button({
    		text: 'Suggest (MapView)',
			ui: 'action',
			handler: this.suggestButtonTap,
			scope: this
        });
    	
    	 this.composeButton = new Ext.Button({
             iconCls: 'compose',
 			 iconMask: true,
             handler: this.onCompose,
             scope: this
         });
    	 
		this.toolbar = new Ext.Toolbar({
			title: 'Temp Stuff',
			doc: 'top',
			layout: 'hbox',
			items: [
			    this.backButton,
				{xtype: 'spacer'},
				this.composeButton,
			]
		});
		
		this.dockedItems = [this.toolbar];
		this.items = [this.reviewButton, this.suggestButton];
		
		FlyTalk.views.SettingView.superclass.initComponent.call(this);
        
    },
    
    onCompose1: function (record, index) {
    	Ext.dispatch({
    		controller: FlyTalk.controllers.dbController,
            action: 'getFollowStatus',
            method: 'getFlightPost',
            next: FlyTalk.views.TalkView,
            list: FlyTalk.views.ColumnView.tweetList,
        });
    },
    
    backButtonTap: function () {
        Ext.dispatch({
            controller: FlyTalk.controllers.ftController,
            action: 'openHome'
        });
    },
    
    onCompose: function (record, index) {
    	 Ext.dispatch({
             controller: FlyTalk.controllers.ftController,
             action: 'openQuestion'
         });
    },
    
	reviewButtonTap: function () {
        Ext.dispatch({
            controller: FlyTalk.controllers.ftController,
            action: 'openReview'
        });
    },

    suggestButtonTap: function () {
        Ext.dispatch({
            controller: FlyTalk.controllers.ftController,
            action: 'openSuggest'
        });
    },

});